Skip to content

Conversation

@jogehl
Copy link

@jogehl jogehl commented Nov 7, 2025

Pull Request check-list

Adds tests and the command HSETEX

@mkmkme
Copy link
Collaborator

mkmkme commented Nov 8, 2025

Hey @jogehl,

Thanks a lot for your contribution, I appreciate that! Could you please force-push your commit with a signoff? We require all of the commits to be signed, so currently the DCO check fails on your PR. You can find the instructions of how to do that here

mkmkme
mkmkme previously requested changes Nov 8, 2025
Copy link
Collaborator

@mkmkme mkmkme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! Overall it looks great. I added some comments to improve it even further. Could you address them?

@jogehl jogehl force-pushed the main branch 6 times, most recently from aa57f75 to 31cf622 Compare November 8, 2025 09:13
@mkmkme
Copy link
Collaborator

mkmkme commented Nov 8, 2025

Also I've just now realised you didn't provide an async version. Could you add it and the test for it as well? It will be mostly copy-paste

@jogehl
Copy link
Author

jogehl commented Nov 10, 2025

Also I've just now realised you didn't provide an async version. Could you add it and the test for it as well? It will be mostly copy-paste

where can I find the implementations for the async? I can't find the async version for the HashCommands.

@mkmkme
Copy link
Collaborator

mkmkme commented Nov 11, 2025

Also I've just now realised you didn't provide an async version. Could you add it and the test for it as well? It will be mostly copy-paste

where can I find the implementations for the async? I can't find the async version for the HashCommands.

AFAICS AsyncHashCommands is just set to be the same as HashCommands. There is a subtle difference, though. valkey-py has a tricky class hierarchy that effectively makes HashCommands use synchronous version of execute_command whilst AsyncHashCommands is using the async one.

TL;DR: could you add an async test to verify it works? Thanks!

Joshua added 4 commits November 12, 2025 16:43
Signed-off-by: Joshua <joshua.gehlen@fkie.fraunhofer.de>
Signed-off-by: Joshua <joshua.gehlen@fkie.fraunhofer.de>
Signed-off-by: Joshua <joshua.gehlen@fkie.fraunhofer.de>
Signed-off-by: Joshua <joshua.gehlen@fkie.fraunhofer.de>
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 85.22727% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.29%. Comparing base (c291080) to head (2c05ea3).

Files with missing lines Patch % Lines
valkey/commands/core.py 70.45% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #246      +/-   ##
==========================================
+ Coverage   76.28%   76.29%   +0.01%     
==========================================
  Files         129      129              
  Lines       33906    33994      +88     
==========================================
+ Hits        25864    25936      +72     
- Misses       8042     8058      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jogehl
Copy link
Author

jogehl commented Nov 19, 2025

Is there anything else which is needed for this PR?

@bogdanp05
Copy link
Collaborator

Hi @jogehl ! Looks good there's just one comment from @mkmkme that should be addressed before merging: #246 (comment) . Atm, the function would allow you to send something like the below to Valkey if you set more than one of (key + value, mapping, items).

127.0.0.1:6379> HSETEX myhash FIELDS 1 f4 v4 2 f5 v5 f6 v6
(error) ERR numfields should be greater than 0 and match the provided number of fields

Signed-off-by: Joshua <joshua.gehlen@fkie.fraunhofer.de>
@jogehl
Copy link
Author

jogehl commented Nov 21, 2025

This should be fixed now. Sorry for the delay.

@bogdanp05 bogdanp05 enabled auto-merge November 21, 2025 13:32
@bogdanp05 bogdanp05 dismissed mkmkme’s stale review November 21, 2025 13:37

All review comments were addressed, except for the HTTL command, which can be done in a future PR

@bogdanp05 bogdanp05 merged commit 69b8245 into valkey-io:main Nov 21, 2025
85 checks passed
@bogdanp05
Copy link
Collaborator

merged, thanks again for the work @jogehl !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for HSETEX

4 participants